package com.niit.controller;

import com.niit.model.StudentPaper;
import com.niit.model.StudentPaperQuestionAnswer;
import com.niit.service.PaperService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(value = "学生模块",tags = {"学生模块"})
@RestController
public class PaperController {
    @Autowired
    private PaperService paperService;
    @ApiOperation("根据ID查询答卷信息")
    @GetMapping("/paper/{id}")
    public  List<StudentPaper>  selectStudentPaperById(@PathVariable("id")Long id){
        return paperService.selectStudentPaperId(id);
    }

    @ApiOperation("获得答卷列表")
    @GetMapping("studentpaper")
    public List<StudentPaper> list(StudentPaper studentPaper){
        return paperService.getList(studentPaper);
    }

}
